package jvm.chapter2;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: algorithm
 * @description: VM Args: -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 * @author: 陈恩涛
 * @create: 2021-10-10 22:00
 **/
public class HeapOOM {
    static class OOMObject{

    }

    public static void main(String[] args) {
        List<OOMObject> list = new ArrayList<OOMObject>();
        while (true) {
            list.add(new OOMObject());
        }
    }
}
